<template>
    <div>

        <!-- 项目数据 -->
        <div>
            <van-field readonly required name="city" :value="fromdata.city" label="地市:" label-width="3em" />
            <van-field readonly required name="county" :value="fromdata.county" label="县区:" label-width="3em" />
            <van-field readonly required name="competeType" :value="fromdata.competeType" label="项目竞争方式:"
                label-width="7em" />
          <van-field readonly required name="customerSource" :value="fromdata.customerSource=='1'?'内部用户':'外部用户'" label="客户来源:"
                     label-width="4.5em" />
            <van-field readonly required name="businessId" :value="fromdata.businessId" label="商机编号:"
                label-width="5em" />

            <!-- 直签 -->
            <van-cell-group v-if="isZQ">
                <van-field readonly required name="projectName" :value="fromdata.projectName" label="项目名称:"
                    label-width="5em" />
                <van-field readonly required name="customerCode" :value="fromdata.customerCode" label="客户编码:"
                    label-width="5em" />
                <van-field readonly required name="customerName" :value="fromdata.customerName" label="客户单位:"
                    label-width="5em" />
              <van-field readonly  name="creditLevel" :value="fromdata.creditLevel" label="集团单位信用等级:"
                         label-width="8.5em" />
              <van-field readonly  name="creditState" :value="fromdata.creditState" label="客户经理信用状态:"
                         label-width="8.5em" />
              <van-field readonly required name="changeExplain" :value="fromdata.changeExplain" label="集团单位信息变更情况说明:"
                         label-width="6.5em" autosize type="textarea" rows="1"/>
              <van-field readonly required name="withType" :value="fromdata.withType" label="项目类型:"
                    label-width="5em" />
                <van-field readonly required name="withBusiness" :value="fromdata.withBusiness" label="行业类型:"
                    label-width="5em" />
                <van-field readonly required autosize type="textarea" rows="1" name="straightMakingDescription"
                    :value="fromdata.straightMakingDescription" label="应标项目描述:" label-width="7em" />
                <van-field readonly required autosize type="textarea" rows="1" name="straightBuildContent"
                    :value="fromdata.straightBuildContent" label="项目建设内容:" label-width="7em" />
            </van-cell-group>

            <!-- 投标 -->
            <van-cell-group v-else>
                <van-field readonly required name="projectName" :value="fromdata.projectName" label="商机名称:"
                    label-width="5em" />
                <van-field readonly required name="customerCode" :value="fromdata.customerCode" label="客户编码:"
                    label-width="5em" />
                <van-field readonly required name="customerName" :value="fromdata.customerName" label="客户名称:"
                    label-width="5em" />
                <van-field readonly required name="budgetAmount" :value="fromdata.budgetAmount" label="商机预算(万元):"
                    label-width="8.5em" />
                <van-field readonly required name="budgetTime" :value="fromdata.budgetTime" label="商机录入时间:"
                    label-width="7em" />
                <van-field readonly required name="tenderDate" :value="fromdata.tenderDate" label="招标公告日期:"
                    label-width="7em" />
                <van-field readonly required name="industryAttribution" :value="fromdata.industryAttribution"
                    label="行业类型:" label-width="5em" />
                <van-field readonly required autosize type="textarea" rows="1" name="makingDescription"
                    :value="fromdata.makingDescription" label="应标项目描述:" label-width="7em" />
                <van-field readonly required autosize type="textarea" rows="1" name="buildContent"
                    :value="fromdata.buildContent" label="项目建设内容:" label-width="7em" />
                <van-field readonly name="isEmphasis" :value="fromdata.isEmphasis" label="是否共性(重点)项目:"
                    label-width="10.5em" />
                <van-field readonly name="emphasisName" :value="fromdata.emphasisName" label="共性(重点)项目名称:"
                    label-width="10.5em" />
            </van-cell-group>

            <!-- 投标主体、省公司审核处室 -->
            <van-field readonly required :right-icon="canEditTBZT ? 'arrow' : ''" name="provinceSupport"
                :value="fromdata.provinceSupport" label="省公司审核处室:" label-width="8em"
                @click="showSHCSPicker = canEditTBZT" />
            <van-popup v-model="showSHCSPicker" position="bottom" get-container="body">
                <van-picker show-toolbar value-key="value" :columns="showSHCSPickerColumns"
                    @confirm="showSHCSPickerOnConfirm" @cancel="showSHCSPicker = false" />
            </van-popup>

            <van-field readonly required :right-icon="canEditTBZT ? 'arrow' : ''" name="bidderMain"
                :value="fromdata.bidderMain" label="投标主体:" label-width="5em"
                @click="canEditTBZT ? bidderMainFun() : ''" />
            <van-popup v-model="showTBZTPicker" position="bottom" get-container="body">
                <van-picker show-toolbar value-key="value" :columns="showTBZTPickerColumns"
                    @confirm="showTBZTPickerOnConfirm" @cancel="showTBZTPicker = false" />
            </van-popup>



            <van-field readonly name="openBidDate" :value="fromdata.openBidDate" label="开标时间:" label-width="5em" />
            <van-field readonly required name="implementManage" :value="fromdata.implementManage" label="项目实施管理单位:"
                label-width="9em" />
            <van-field readonly name="qualificationClaim" :value="fromdata.qualificationClaim" label="资格资质要求:"
                label-width="7em" />
            <van-field readonly name="payWay" :value="fromdata.payWay" label="付款方式:" label-width="5em" />
            <van-field readonly name="scoringMethod" :value="fromdata.scoringMethod" label="评分办法:" label-width="5em" />
            <van-field readonly name="competitor" :value="fromdata.competitor" label="竞争对手:" label-width="5em" />
            <van-field readonly required name="winProbability" :value="fromdata.winProbability" label="中标概率:"
                label-width="5em" />
            <van-field readonly required name="projectTemplate" :value="fromdata.projectTemplate" label="项目合作模式:"
                label-width="7em" />
            <van-field readonly autosize type="textarea" rows="1" name="competitionAnalysis"
                :value="fromdata.competitionAnalysis" label="竞争分析:" label-width="5em" />
            <van-field readonly name="isSpecialDebt" :value="fromdata.isSpecialDebt==1?'是':'否'" label="是否专项债:"
                label-width="6em" />
            <van-field readonly required name="isIncludeSolution" :value="fromdata.isIncludeSolution == 1 ? '是' : '否'" label="是否包含三化解决方案:" label-width="11em" />
            <div v-if="fromdata.isIncludeSolution == 1">
              <van-field readonly label="三化解决方案信息：" label-width="9em" />
              <el-table :data="fromdata.includeSolutionList" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
                        style="width: 100%">
                <el-table-column prop="solutionInfoName" label="三化方案名称" width="140" />
                <el-table-column prop="solutionInfoCode" label="三化方案编码" width="120" />
                <el-table-column prop="solutionInfoAmount" label="三化预估金额（含税、万元）" width="150" />
              </el-table>
            </div>
            <van-field readonly name="null" :value="fromdata.null" label="材料模板:" label-width="5em" />


            <!-- 中标概率 为“低”，才有“原因、说明函” -->
            <van-field v-if="showLowBidReasonFileList" readonly autosize type="textarea" rows="1" name="lowBidReason"
                :value="fromdata.lowBidReason" label="低中标概率原因:" label-width="8em" />
            <van-field v-if="showLowBidReasonFileList" label-width="10em" readonly label="低中标概率说明函:" class="lyy-width"
                input-align="left" required placeholder="" />
            <div v-for="(fileitem) in fromdata.lowBidReasonFileList" :key="fileitem.id" style="margin-left:20px">
                <div v-if="showLowBidReasonFileList" readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>



            <van-field readonly name="isPrepayments" :value="fromdata.isPrepayments ? '是' : '否'" label="成本侧是否有预付款:"
                label-width="9.5em" />
            <!-- 选项为 是， 才有“供应商提供资质” -->
            <van-field readonly name="isSupplier" :value="fromdata.isSupplier ? '是' : '否'" label="是否需要供应商提供相应资质:"
                label-width="14em" />
            <van-field v-if="fromdata.isSupplier" readonly required autosize type="textarea" rows="1"
                name="supplierQualification" :value="fromdata.supplierQualification" label="供应商提供资质:"
                label-width="8em" />


            <van-field readonly required name="lowEstimatedOffer" :value="fromdata.lowEstimatedOffer"
                label="最低预估报价(万元):" label-width="10.5em" />
            <van-field readonly required name="higEstimatedOffer" :value="fromdata.higEstimatedOffer" label="预估总成本(万元):"
                label-width="9.5em" />
            <van-field readonly required name="netProfit" :value="fromdata.netProfit" label="净利润率:" label-width="5em" />
            <van-field v-if="showJLRL" readonly name="jcNetProfit" :value="fromdata.jcNetProfit" label="集成净利润率:"
                label-width="7em" />
            <van-field v-if="showJLRL" readonly name="ydNetProfit" :value="fromdata.ydNetProfit" label="移动净利润率:"
                label-width="7em" />
            <van-field readonly name="canAmount" :value="fromdata.canAmount" label="可收计金额(万元):" label-width="9.5em" />
            <van-field readonly name="noCanAmount" :value="fromdata.noCanAmount" label="不可收计金额(万元):"
                label-width="10.5em" />
        </div>


        <!-- 附件部分 -->
        <div>
            <van-field label-width="10em" readonly label="上会材料:" class="lyy-width" input-align="left" required
                placeholder="" />
            <div v-for="(fileitem) in fromdata.upMeetingFileList" :key="fileitem.id" style="margin-left:20px">
                <div readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>

            <van-field label-width="10em" readonly label="技术规范书:" class="lyy-width" input-align="left" placeholder="" />
            <div v-for="(fileitem) in fromdata.specificationsFileList" :key="fileitem.id" style="margin-left:20px">
                <div readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>

            <van-field v-if="showDescriptionFileList" label-width="10em" readonly label="资质共享说明函:" class="lyy-width"
                input-align="left" required placeholder="" />
            <div v-for="(fileitem) in fromdata.descriptionFileList" :key="fileitem.id" style="margin-left:20px">
                <div v-if="showDescriptionFileList" readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>

            <van-field v-if="showUndertakeFileList" label-width="10em" readonly label="承接说明函:" class="lyy-width"
                input-align="left" required placeholder="" />
            <div v-for="(fileitem) in fromdata.undertakeFileList" :key="fileitem.id" style="margin-left:20px">
                <div v-if="showUndertakeFileList" readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>


            <van-field v-if="showCostFileList" label-width="10em" readonly label="成本评估报告:" class="lyy-width"
                input-align="left" required placeholder="" />
            <div v-for="(fileitem) in fromdata.costFileList" :key="fileitem.id" style="margin-left:20px">
                <div v-if="showCostFileList" readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>


            <van-field v-if="showMeetingFileList" readonly required name="meetingFileList"
                :value="fromdata.meetingFileList" label="原会议纪要:" label-width="6em" />
            <van-field v-if="showChangeDescriptionFileList" readonly required name="changeDescriptionFileList"
                :value="fromdata.changeDescriptionFileList" label="变更说明函:" label-width="6em" />


            <van-field v-if="showComments" readonly autosize type="textarea" rows="1" name="comments"
                :value="fromdata.comments" label="转批意见:" label-width="5em" />
            <van-field v-if="showComments" readonly label="补充材料:" label-width="5em" />
            <div v-for="(fileitem) in fromdata.supplementFileList" :key="fileitem.id" style="margin-left:20px">
                <div v-if="showComments" readonly class="font14 fileLink" style="color:#0F85CF">
                    <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
                </div>
            </div>
        </div>


        <!-- 地市公司承办 -->
        <section-header v-if="hasDSCB" :sectionTitle="'地市公司承办'" />
        <div v-if="hasDSCB">
            <van-field readonly required :right-icon="canEditDSCB ? 'arrow' : ''" name="cityDecision"
                :value="fromdata.cityDecision" label="市公司决策结果:" label-width="8em"
                @click="cityDecisionShow = canEditDSCB" :rules="[{ required: canEditDSCB, message: '请填写市公司决策结果' }]" />
            <van-popup v-model="cityDecisionShow" position="bottom" get-container="body">
                <van-picker show-toolbar value-key="value" :columns="decisionColumns" @confirm="cityDecisionOnConfirm"
                    @cancel="cityDecisionShow = false">
                </van-picker>
            </van-popup>

            <van-field :readonly="!canEditSGSCB" autosize type="textarea" rows="1" name="cityDecisionOpinion"
                v-model="fromdata.cityDecisionOpinion" label="市公司决策意见:" label-width="8em" />

            <van-field readonly required :right-icon="canEditDSCB ? 'arrow' : ''" name="cityDecisionDate"
                :value="fromdata.cityDecisionDate" label="市公司审批时间:" label-width="8em"
                @click="cityDecisionDateShow = canEditDSCB"
                :rules="[{ required: canEditDSCB, message: '请填写市公司审批时间' }]" />
            <van-popup v-model="cityDecisionDateShow" position="bottom" get-container="body">
                <van-datetime-picker v-model="currentDate" :formatter="formatter" type="date"
                    @cancel="cityDecisionDateShow = false" @confirm="cityDecisionDateOnConfirm" />
            </van-popup>


            <van-field readonly required name="cityDecisionUndertaker" :value="fromdata.cityDecisionUndertaker"
                label="市公司承办人:" label-width="7em" :rules="[{ required: canEditDSCB, message: '请填写市公司承办人' }]" />
        </div>


        <!-- 省公司承办 -->
        <section-header v-if="hasSGSCB" :sectionTitle="'省公司承办'" />
        <div v-if="hasSGSCB">
            <van-field readonly required :right-icon="canEditSGSCB ? 'arrow' : ''" name="provinceDecision"
                :value="fromdata.provinceDecision" label="省公司决策结果:" label-width="8em"
                @click="provinceDecisionShow = canEditSGSCB"
                :rules="[{ required: canEditSGSCB, message: '请填写省公司决策结果' }]" />
            <van-popup v-model="provinceDecisionShow" position="bottom" get-container="body">
                <van-picker show-toolbar value-key="value" :columns="decisionColumns"
                    @confirm="provinceDecisionOnConfirm" @cancel="provinceDecisionShow = false">
                </van-picker>
            </van-popup>

            <van-field :readonly="!canEditSGSCB" autosize type="textarea" rows="1" name="provinceDecisionOpinion"
                v-model="fromdata.provinceDecisionOpinion" label="省公司决策意见:" label-width="8em" />

            <van-field readonly required :right-icon="canEditSGSCB ? 'arrow' : ''" name="provinceDecisionDate"
                :value="fromdata.provinceDecisionDate" label="省公司审批时间:" label-width="8em"
                @click="provinceDecisionDateShow = canEditSGSCB"
                :rules="[{ required: canEditSGSCB, message: '请填写省公司审批时间' }]" />
            <van-popup v-model="provinceDecisionDateShow" position="bottom" get-container="body">
                <van-datetime-picker v-model="currentDate" :formatter="formatter" type="date"
                    @confirm="provinceDecisionDateOnComfirm" @cancel="provinceDecisionDateShow = false" />
            </van-popup>
            <van-field readonly required name="provinceDecisionUndertaker" :value="fromdata.provinceDecisionUndertaker"
                label="省公司承办人:" label-width="7em" :rules="[{ required: canEditSGSCB, message: '请填写省公司承办人' }]" />
        </div>


        <!-- 当前办理人 -->
        <section-header v-if="showHistory" :sectionTitle="'当前办理人:'" />
        <div v-if="showHistory" class="font13 ptandpb10 pl16">
            <div>
                <span class="titletext font13">{{
                    historydata.MANAGER
                    }}</span>
            </div>
            <div class="mt5">
                <span class="graytext font12">{{ historydata.DEPARTMENT }}</span>
            </div>
        </div>


        <!-- 审批意见 -->
        <section-header id="opinion" :sectionTitle="'审批意见:'" />
        <opinion-item :approveList="approveList" />

    </div>
</template>
 
<script>

import { getDictList } from "@/api/dictapi";
import { openFileUrl } from '@/store/openFile'
import OpinionItem from '../sztdzj/sztdzjDetail/opinion-item.vue';
import SectionHeader from '../sztdzj/sztdzjDetail/section-header.vue';
import { Notify } from "vant";
import { mapGetters } from "vuex";
import moment from 'moment'
import jTool from "@/assets/js/jHelper";

export default {
    name: "XeTableOne",
    data() {
        return {

            showSupplementFileList: false,

            showTBZTPicker: false,
            showTBZTPickerColumns: [],
            showSHCSPicker: false,
            showSHCSPickerColumns: [
                { label: '党政行业拓展室', value: '党政行业拓展室' },
                { label: '执法行业拓展室', value: '执法行业拓展室' },
                { label: '医疗行业拓展室', value: '医疗行业拓展室' },
                { label: '工业能源行业拓展室', value: '工业能源行业拓展室' },
                { label: '文化教育行业拓展室', value: '文化教育行业拓展室' },
                { label: '交通行业拓展室', value: '交通行业拓展室' },
                { label: '金融行业拓展室', value: '金融行业拓展室' },
                { label: '农商行业方案室', value: '农商行业方案室' }],


            showDescriptionFileList: false,
            showUndertakeFileList: false,
            showCostFileList: false,
            showMeetingFileList: false,
            showChangeDescriptionFileList: false,


            hasDSCB: false,     /// 地市承办
            hasSGSCB: false,    /// 省公司承办
            canEditDSCB: false,
            canEditSGSCB: false,


            decisionColumns: [{ label: '同意', value: '同意' },
            { label: '不同意', value: '不同意' }],
            currentDate: new Date(),

            cityDecisionShow: false,
            cityDecisionDateShow: false,

            provinceDecisionShow: false,
            provinceDecisionDateShow: false,

        }
    },

    props: ['fromdata', 'showHistory', 'historydata', 'approveList', 'location', 'workItemName'],


    computed: {
        ...mapGetters(["user"]),
        ...mapGetters(["userinfo"]),

        /// 直签、投标
        isZQ (){
            return this.fromdata.competeType == '直签';
        },

        /// 投标主体、省公司审核处室 
        canEditTBZT(){
            return this.location == "dict.supportAssignToLeadership" && this.userinfo.belongCompanyName == "省公司";
        },

        /// 中标概率 低
        showLowBidReasonFileList(){
            return this.fromdata.winProbability == '低';  
        },

        /// 集成净利润率、集成净利润率
        showJLRL() {
            return this.fromdata.projectTemplate == '资质共享';
        },

        ///
        showComments() {
            return this.showHistory || this.location != 'dict.start';
        },


    },

    watch: {
        fromdata: {

            handler() {
                //这是vue的规定写法，当你watch的值发生变化的时候，就会触发这个handler，这是vue内部帮你做的事情
                console.log('changeFromdata list changed')
                this.$emit('freshData', this.fromdata)

                console.log('changeFromdata list changed' + this.fromdata.cityDecision );

                this.configUIRule();
                this.configCBRule();
            },


            deep: true,  // 可以深度检测到 obj 对象的属性值的变化
            immediate: true //刷新加载  立马触发一次handler
        },
    },

    created() {

    },

    methods: {

        formatter(type, val) {
            if (type === 'year') {
                return `${val}年`;
            }
            else if (type === 'month') {
                return `${val}月`;
            } else if (type === 'day') {
                return `${val}日`;
            }

            return val;
        },

        cityDecisionOnConfirm(value) {

            this.cityDecisionShow = false;
            this.fromdata.cityDecision = value.value;

        },

        cityDecisionDateOnConfirm(value) {

            this.cityDecisionDateShow = false;
            this.fromdata.cityDecisionDate = moment(value).format('YYYY-MM-DD');
        },

        provinceDecisionOnConfirm(value) {

            this.provinceDecisionShow = false;
            this.fromdata.provinceDecision = value.value;

            console.log(value.value);
        },

        provinceDecisionDateOnComfirm(value) {

            this.provinceDecisionDateShow = false;
            this.fromdata.provinceDecisionDate = moment(value).format('YYYY-MM-DD');
        },

        /// 承办模块规则
        configCBRule() {

            var workItemName = this.workItemName;
            var location = this.location;

            
            if (location != "dict.start" && this.userinfo.belongCompanyName == "省公司") {

                // 省公司直接发起的工单不存在地市审批结果不进行展示,若存在有值再进行展示
                if (!jTool.stringIsEmpty(this.fromdata.cityDecisionDate)) {
                    this.hasDSCB = true;
                }

                this.hasSGSCB = true;
                this.canEditSGSCB = true;
                if (jTool.stringIsEmpty(this.fromdata.provinceDecisionDate)) {

                    var day2 = new Date();
                    day2.setTime(day2.getTime());
                    this.fromdata.provinceDecisionDate = day2.getFullYear() + "-" + (day2.getMonth() + 1) + "-" + day2.getDate();
                    this.fromdata.provinceDecisionUndertaker = this.userinfo.truename;
                }
            }
            else 
            {
                if (location != 'dict.toStart') {
                    self.canEditDSCB = true;
                }

                /// 市公司 承办
                if (workItemName == "请政企部审批(市公司)" || ((workItemName == "同意,请办理" || workItemName == "拟同意,请领导审批" || workItemName == "转办") && this.userinfo.belongCompanyTypeDictValue == "02")) {

                    this.hasDSCB = true;
                    this.canEditDSCB = true;

                    if (jTool.stringIsEmpty(this.fromdata.cityDecisionDate)) {
                        var day2 = new Date();
                        day2.setTime(day2.getTime());
                        this.fromdata.cityDecisionDate = day2.getFullYear() + "-" + (day2.getMonth() + 1) + "-" + day2.getDate();
                        this.fromdata.cityDecisionUndertaker = this.userinfo.truename;
                    }
                }

                if (location != "dict.start") {

                    if (!jTool.stringIsEmpty(this.fromdata.cityDecisionDate)) {
                        this.hasDSCB = true;
                        this.canEditDSCB = true;
                    }

                    if (!jTool.stringIsEmpty(this.fromdata.provinceDecisionDate)) {
                        this.hasSGSCB = true;
                        this.canEditSGSCB = true;
                    }
                }
            }

            // console.log('AAAAAAAAccccc' + this.fromdata.cityDecision);

            if (location == "dict.toStart" || location == "dict.copy") {

                if (!jTool.stringIsEmpty(this.fromdata.cityDecision)) {
                    this.hasDSCB = true;
                }

                if (!jTool.stringIsEmpty(this.fromdata.provinceDecision)) {
                    this.hasSGSCB = true;
                }
            }


            /// 已办不可编辑
            if (this.showHistory) {

                this.canEditDSCB = false;
                this.canEditSGSCB = false;
            }

        },

        /// 界面规则
        configUIRule() {
            
            /// 项目合作模式
            if (this.fromdata.projectTemplate == '集成管理') {

                this.showCostFileList = true;
                this.showUndertakeFileList = true;
            }
            else if (this.fromdata.projectTemplate == '联合体') {

                this.showCostFileList = true;
            }
            else if (this.fromdata.projectTemplate == '项目变更') {

                this.showMeetingFileList = true;
                this.showUndertakeFileList = true;
            }
            else if (this.fromdata.projectTemplate == '资质共享') {

                this.showDescriptionFileList = true;
            }

            
        },

        /// 投标主体
        bidderMainFun() {

            if (this.showTBZTPickerColumns.length > 0) {
                this.showTBZTPicker = true;
                return;
            }

            getDictList('bidderMainType', { userName: this.user.userName })
                .then((result) => {

                    if (!result.data) {
                        Notify(result.message);
                        return;
                    }

                    this.showTBZTPickerColumns = [];
                    for (var i = 0; i < result.data.data.length; i++) {
                        this.showTBZTPickerColumns.push(result.data.data[i]);
                    }

                    this.showTBZTPicker = true;
                })
        },

        showTBZTPickerOnConfirm(value) {
            this.fromdata.bidderMain = value.value;
            this.showTBZTPicker = false;
        },

        showSHCSPickerOnConfirm(value) {
            this.fromdata.provinceSupport = value.value;
            this.showSHCSPicker = false;
        },

        tomsg() {
            document.getElementById('opinion').scrollIntoView({ behavior: 'smooth' })
        },

        openFileUrlfun(value) {
            this.$router.push(
                {
                    name: 'fileview',
                    query: {
                        openFileUrl: openFileUrl(value)
                    }
                }
            );
        },

    },





    //生命周期--挂载完成
    components: {

        OpinionItem,
        SectionHeader
    },

}
</script>
 
<style lang="scss" scoped></style>